// 主题入口文件
import DefaultTheme from 'vitepress/theme'
import './custom.css'
import ThemeSwitcher from './components/ThemeSwitcher.vue'
import { h } from 'vue'

export default {
  ...DefaultTheme,
  Layout() {
    return h(DefaultTheme.Layout, null, {
      'nav-bar-content-after': () => [
        h(ThemeSwitcher)
      ]
    })
  },
  enhanceApp({ app }) {
    // 注册主题切换组件
    app.component('ThemeSwitcher', ThemeSwitcher)
  }
}